<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>高级查询</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<jsp:include page="/scripts/jquery/index.html"></jsp:include>
<jsp:include page="/scripts/bootstrap/index.html"></jsp:include>
<link rel="stylesheet" href="${basepath }style/default.css">
<script type="text/javascript">
$(function(){
	columnselect();
	$("#columns").change(function(){
		columnselect();
	});
});

function columnselect(){
	var colvalue=$("#columns").find("option:selected").val();
	if(colvalue=="colName"){
		valuescont = "<input type='text' class='form-control'>";
	}else if(colvalue=="colStatus"){
		valuescont = "<select class='form-control'><option value='生效'>生效</option><option value='失效'>失效</option></select>";
	}else if(colvalue=="colTime"){
		valuescont = "<input type='text' class='form-control' placeholder='时间选择器'>";
	}
	var values = document.getElementById("values");
	//alert(valuescont);
	//values.appendChild(valuescont);
	values.innerHTML=valuescont;
}
function save() {
	SN.alert.info("11111111");
	// closeWindow();
}
function closeWindow() {
	parent.w1.close();
}
</script>
</head>
<body>
	<form>
		<table class="contTable">
			<tr class="firstTr">
				<td>
					<button onclick="save()" class="btn btn-primary" type="button">
						<span class="glyphicon glyphicon-search" aria-hidden="true"></span>&nbsp;<span>查询</span>
					</button>
					<button onclick="closeWindow()" class="btn btn-primary" type="button">
						<span class="glyphicon glyphicon-remove-sign" aria-hidden="true"></span>&nbsp;<span>关闭</span>
					</button>
				</td>
			</tr>
			<tr>
				<td valign="top">
					<div class="blockBorder">
						<table class="table table-striped table-bordered" style="width:98%;margin:auto;margin-top:10px;border-top:0px">
							<tbody align="center" class="childTable">
								<tr style="background:#f0efef" class="childTitle">
									<td style="width:25%">字段</td>
									<td style="width:25%">运算符</td>
									<td style="width:25%">值</td>
									<td style="width:25%">连接符</td>
								</tr>
								<tr class="childCont">
									<td><select class="form-control" id="columns">
											<option value="colName">名称</option>
											<option value="colStatus">状态</option>
											<option value="colTime">时间</option>
									</select></td>
									<td><select class="form-control">
											<option value="=">等于（=）</option>
											<option value=">">大于（>）</option>
											<option value="<">小于（<）</option>
									</select></td>
									<td id="values"></td>
									<td align="center"><select class="form-control">
											<option value="and">And</option>
											<option value="or">OR</option>
									</select></td>
								</tr>
							</tbody>
						</table>
						<table class="table table-striped table-bordered" style="width:98%;margin:auto;margin-top:0px;margin-bottom:0px">
							<tbody>
								<tr class="footerCont">
									<td colspan="5">
										<button class="btn btn-primary">提取条件</button>
										<button class="btn btn-primary">清除条件</button>
									</td>
								</tr>
							</tbody>
						</table>
						<table class="table table-striped" style="width:98%;margin:auto;margin-top:0px;margin-bottom:5px;border-top:0px">
							<tr class="selectBtn">
								<td>
									<button>(</button>
									<button>)</button>
									<button>"</button>
									<button>+</button>
									<button>-</button>
									<button>*</button>
									<button>/</button>
									<button>%</button>
								</td>
							</tr>
						</table>
					</div>
					<div class="blockBorder">
						<textarea class="form-control" rows="3" style="width:100%;height:160px;border:0px"></textarea>
					</div>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
